<?php


namespace App\Models\MaintainRepair;

use App\Models\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;

class MrApplyFile extends Model
{
    protected $table = 'akbus_mr_apply_file';

    protected $fillable = [
        'type',
        'file_name',
        'file_path',
        'file_type',
        'file_size',
        'user_id',
        'mr_apply_id',
        'note',
    ];

    /**
     * 不可批量赋值的属性。
     *
     * @var array
     */
    protected $guarded = [
    ];

    /**
     * 类型转化
     *
     * @var array
     */
    protected $casts = [
    ];

    /**
     * 隐藏的字段
     *
     * @var array
     */
    protected $hidden = [
    ];

    /**
     * 对应的申请
     *
     * @return BelongsTo
     */
    public function apply(): BelongsTo
    {
        return $this->belongsTo(MrApply::class);
    }
}
